<!--定义分页请求地址，传递给backConstant.ftl-->
<#assign urllist="${rc.contextPath}/group/merchantAdminJsonList" />
<!--定义详情请求地址，传递给backConstant.ftl-->
<#assign urldetail="${rc.contextPath}/group/merchantAdminJsonDetail" />
<!--定义添加表单初始值请求地址，传递给backConstant.ftl-->
<#assign urladdforminit="${rc.contextPath}/group/merchantAdminJsonAddFormInit" />
<!--定义保存实体变量地址，传递给backConstant.ftl-->
<#assign urlsave="${rc.contextPath}/group/merchantAdminJsonSave" />
<!--定义修改实体变量地址，传递给backConstant.ftl-->
<#assign urlupdate="${rc.contextPath}/group/merchantAdminJsonUpdate" />
<!--定义删除实体变量地址，传递给backConstant.ftl-->
<#assign urldelete="${rc.contextPath}/group/merchantAdminJsonDelete" />
<!--定义恢复实体变量地址，传递给backConstant.ftl-->
<#assign urlrenew="${rc.contextPath}/group/merchantAdminJsonRenew" />
<#assign urlparentGroupdata="${rc.contextPath}/group/groupAdminJsonData" />
<#assign urlareadata="${rc.contextPath}/group/areaAdminJsonData" />

<!--include常量-->
<#include "/misc/backConstant.ftl">

<script type="text/javascript">
		//设置分页表格的属性
		var paginationColumns = 
			[
			 {field:"area.name",title:"<@i18n.message "group.merchant.field.area"/>",width:50},
			 {field:"mobile",title:"<@i18n.message "group.merchant.field.mobile"/>",width:50},
			 {field:"fax",title:"<@i18n.message "group.merchant.field.fax"/>",width:50},
			 {field:"email",title:"<@i18n.message "group.merchant.field.email"/>",width:50},
			 {field:"code",title:"<@i18n.message "group.merchant.field.code"/>",width:50},
			 {field:"parentGroup.shortName",title:"<@i18n.message "group.merchant.field.parentgroup"/>",width:50},
			 {field:"fullName",title:"<@i18n.message "group.merchant.field.fullname"/>",width:50},
			 {field:"shortName",title:"<@i18n.message "group.merchant.field.shortname"/>",width:50},
			 {field:"valid",title:"<@i18n.message "group.merchant.field.valid"/>",width:50},
			 {field:"createdate",title:"<@i18n.message "group.merchant.field.createdate"/>",width:50},
			 {field:"loginMode",title:"<@i18n.message "group.merchant.field.loginmode"/>",width:50}
			];
			 
		//查询
		function doSearch${currentActionName}(){
			$('#' + dg).datagrid('load',{
				"area.id": $('#areaSearchKey${currentActionName}').combobox('getValue'),
				"mobile": $('#mobileSearchKey${currentActionName}').val(),
				"fax": $('#faxSearchKey${currentActionName}').val(),
				"email": $('#emailSearchKey${currentActionName}').val(),
				"code": $('#codeSearchKey${currentActionName}').val(),
				"parentGroup.id": $('#parentGroupSearchKey${currentActionName}').combobox('getValue'),
				"fullName": $('#fullNameSearchKey${currentActionName}').val()
		    });
		}
		
		//可以在这里扩充详情的显示
		function detailSet${currentActionName}(result){
		}
		
		$.get("${urlparentGroupdata}", function(result) {
			var options = {
				data : result,
				textField:'${CoreConstants.VIEW_SELECT_LABEL_TEXT}',
				valueField:'${CoreConstants.VIEW_SELECT_LABEL_VALUE}'
			};
			$('#parentGroupFormKey${currentActionName}').combobox(options);
			$('#parentGroupSearchKey${currentActionName}').combobox(options);
		});
		
		$.get("${urlareadata}", function(result) {
			var options = {
				data : result,
				textField:'${CoreConstants.VIEW_SELECT_LABEL_TEXT}',
				valueField:'${CoreConstants.VIEW_SELECT_LABEL_VALUE}'
			};
			$('#areaSearchKey${currentActionName}').combobox(options);
		});
		
</script>
<script type="text/javascript" src="${rc.contextPath}/static/js/crud.js"></script>

<div style="padding:5px;">
	<table id="dg${currentActionName}"></table>
	<div id="toolbar${currentActionName}"  style="padding:5px;height:auto">
		<div style="margin-bottom:5px">
			<a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="openDetail('detail','${currentActionName}','${urldetail}')"><@i18n.message "button.detail"/></a>
		</div>
		<div>
			<input id="areaSearchKey${currentActionName}" class="easyui-combobox" data-options="prompt:'<@i18n.message "group.merchant.field.area"/>'"> &nbsp;&nbsp;
			<input id="mobileSearchKey${currentActionName}" class="easyui-textbox" data-options="prompt:'<@i18n.message "group.merchant.field.mobile"/>'"> &nbsp;&nbsp;
			<input id="faxSearchKey${currentActionName}" class="easyui-textbox" data-options="prompt:'<@i18n.message "group.merchant.field.fax"/>'"> &nbsp;&nbsp;
			<input id="emailSearchKey${currentActionName}" class="easyui-textbox" data-options="prompt:'<@i18n.message "group.merchant.field.email"/>'"> &nbsp;&nbsp;
			<input id="codeSearchKey${currentActionName}" class="easyui-textbox" data-options="prompt:'<@i18n.message "group.merchant.field.code"/>'"> &nbsp;&nbsp;<br />
			<input id="parentGroupSearchKey${currentActionName}" class="easyui-combobox" data-options="prompt:'<@i18n.message "group.merchant.field.parentgroup"/>'"> &nbsp;&nbsp;
			<input id="fullNameSearchKey${currentActionName}" class="easyui-textbox" data-options="prompt:'<@i18n.message "group.merchant.field.fullname"/>'"> &nbsp;&nbsp;

			<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="doSearch${currentActionName}()"><@i18n.message "button.search"/></a>
		</div>
	</div>
	

	
	<div id="detail${currentActionName}" class="easyui-dialog" closed="true" resizable="true" minimizable="true" collapsible="true" maximizable="true" style="width:35%;height:70%;padding:10px 20px" buttons="#detail-buttons${currentActionName}">
		<div class="ftitle"><@i18n.message "group.merchant.info"/></div>
		<table class="window_table">
			<tr>
				<td><@i18n.message "group.merchant.field.area"/>:</td>
				<td><label id="area_name${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.linkman"/>:</td>
				<td><label id="linkman${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.tel"/>:</td>
				<td><label id="tel${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.mobile"/>:</td>
				<td><label id="mobile${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.fax"/>:</td>
				<td><label id="fax${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.email"/>:</td>
				<td><label id="email${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.memo"/>:</td>
				<td><label id="memo${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.code"/>:</td>
				<td><label id="code${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.parentgroup"/>:</td>
				<td><label id="parentGroup_shortName${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.fullname"/>:</td>
				<td><label id="fullName${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.shortname"/>:</td>
				<td><label id="shortName${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.valid"/>:</td>
				<td><label id="valid${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.createdate"/>:</td>
				<td><label id="createdate${currentActionName}"></label></td>
			</tr>
			<tr>
				<td><@i18n.message "group.merchant.field.loginmode"/>:</td>
				<td><label id="loginMode${currentActionName}"></label></td>
			</tr>
		</table>


	</div>
	<div id="detail-buttons${currentActionName}">
		<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="cancelForm('detail',null,'${currentActionName}')"><@i18n.message "button.closed"/></a>
	</div>
</div>